package com.yc.supermarket.entity;

import java.math.BigDecimal;
import java.util.Date;
/*商品实体类*/
public class Commodity {
    private int commodityId;
    private String commodityName;
    private BigDecimal price;
    private BigDecimal promotionalPrice;
    private Date promotionStartDate;
    private Date promotionEndDate;
    private int allowDiscount;
    private int stockQuantity;
    private int stockAlarmQuantity;
    private int allowSale;
    private int manufacturerId;
    private int supplierId;
    private int typeId;
    private String commodityPic;
    private ProductType productType;

    public ProductType getProductType() {
        return productType;
    }

    public void setProductType(ProductType productType) {
        this.productType = productType;
    }

    public int getCommodityId() {
        return commodityId;
    }

    public void setCommodityId(int commodityId) {
        this.commodityId = commodityId;
    }

    public String getCommodityName() {
        return commodityName;
    }

    public void setCommodityName(String commodityName) {
        this.commodityName = commodityName;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getPromotionalPrice() {
        return promotionalPrice;
    }

    public void setPromotionalPrice(BigDecimal promotionalPrice) {
        this.promotionalPrice = promotionalPrice;
    }

    public Date getPromotionStartDate() {
        return promotionStartDate;
    }

    public void setPromotionStartDate(Date promotionStartDate) {
        this.promotionStartDate = promotionStartDate;
    }

    public Date getPromotionEndDate() {
        return promotionEndDate;
    }

    public void setPromotionEndDate(Date promotionEndDate) {
        this.promotionEndDate = promotionEndDate;
    }

    public int getAllowDiscount() {
        return allowDiscount;
    }

    public void setAllowDiscount(int allowDiscount) {
        this.allowDiscount = allowDiscount;
    }

    public int getStockQuantity() {
        return stockQuantity;
    }

    public void setStockQuantity(int stockQuantity) {
        this.stockQuantity = stockQuantity;
    }

    public int getStockAlarmQuantity() {
        return stockAlarmQuantity;
    }

    public void setStockAlarmQuantity(int stockAlarmQuantity) {
        this.stockAlarmQuantity = stockAlarmQuantity;
    }

    public int getAllowSale() {
        return allowSale;
    }

    public void setAllowSale(int allowSale) {
        this.allowSale = allowSale;
    }

    public int getManufacturerId() {
        return manufacturerId;
    }

    public void setManufacturerId(int manufacturerId) {
        this.manufacturerId = manufacturerId;
    }

    public int getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(int supplierId) {
        this.supplierId = supplierId;
    }

    public int getTypeId() {
        return typeId;
    }

    public void setTypeId(int typeId) {
        this.typeId = typeId;
    }

    public String getCommodityPic() {
        return commodityPic;
    }

    public void setCommodityPic(String commodityPic) {
        this.commodityPic = commodityPic;
    }

    @Override
    public String toString() {
        return "Commodity{" +
                "commodityId=" + commodityId +
                ", commodityName='" + commodityName + '\'' +
                ", price=" + price +
                ", promotionalPrice=" + promotionalPrice +
                ", promotionStartDate=" + promotionStartDate +
                ", promotionEndDate=" + promotionEndDate +
                ", allowDiscount=" + allowDiscount +
                ", stockQuantity=" + stockQuantity +
                ", stockAlarmQuantity=" + stockAlarmQuantity +
                ", allowSale=" + allowSale +
                ", manufacturerId=" + manufacturerId +
                ", supplierId=" + supplierId +
                ", typeId=" + typeId +
                ", commodityPic='" + commodityPic + '\'' +
                ", productType=" + productType +
                '}';
    }

    public Commodity(int commodityId, String commodityName, BigDecimal price, BigDecimal promotionalPrice, Date promotionStartDate, Date promotionEndDate, int allowDiscount, int stockQuantity, int stockAlarmQuantity, int allowSale, int manufacturerId, int supplierId, int typeId, String commodityPic, ProductType productType) {
        this.commodityId = commodityId;
        this.commodityName = commodityName;
        this.price = price;
        this.promotionalPrice = promotionalPrice;
        this.promotionStartDate = promotionStartDate;
        this.promotionEndDate = promotionEndDate;
        this.allowDiscount = allowDiscount;
        this.stockQuantity = stockQuantity;
        this.stockAlarmQuantity = stockAlarmQuantity;
        this.allowSale = allowSale;
        this.manufacturerId = manufacturerId;
        this.supplierId = supplierId;
        this.typeId = typeId;
        this.commodityPic = commodityPic;
        this.productType = productType;
    }

    public Commodity() {
    }
}
